import api from '../index';
import type { ResponseData, pageParam } from '../type';

export interface itemParams {
	id:String,
	orderId:String,//订单编号
	orderMoney:String,//订单消费
	allJifen:String,//获得消费
	allSend:String,//预估赠送消费券
	hadSendDeduction:String,//已赠送消费券
	allPeriod:String,//预估赠送次数
	hadSendPeriod:String,//已赠送次数
}

export interface detailParams {
	orderId:String,//活动次数 	
	orderMoney:String,//赠送数量
	allJifen:String,//赠送时间
}

// 我的赠送活动
export const getProfitList = (data: itemParams & pageParam) =>
	api.get<ResponseData<itemParams[]>>('customer/profit/user/order/list', {
		data
	});

// 我的赠送活动
export const getProfitDetail = (data: itemParams & pageParam) =>
	api.get<ResponseData<detailParams[]>>('customer/profit/user/order/detail', {
		data
	});
